# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=eigrp-tools
pkgver=0.1
pkgrel=6
pkgdesc='This is a custom EIGRP packet generator and sniffer developed to test the security and overall operation quality of this brilliant Cisco routing protocol.'
groups=('blackarch' 'blackarch-sniffer' 'blackarch-networking'
        'blackarch-recon' 'blackarch-scanner')
arch=('any')
url='http://www.hackingciscoexposed.com/?link=tools'
license=('GPL2')
depends=('perl' 'perl-net-rawip' 'perl-netpacket')
source=('http://www.hackingciscoexposed.com/tools/$pkgname.tar.gz')
sha512sums=('100c8f5a32d0900c4f1af6363ec922b5877324889d9eadde03e147b41644b9fa3c0a3c7840474fc0b71dfafe911cb619381dc4e217a4a007a79a04a46670ed27')

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"

  install -Dm 644 -t "$pkgdir/usr/share/eigrp/" eigrp.pl eigrp.conf
  install -Dm 644 MINI-README "$pkgdir/usr/share/doc/$pkgname/MINI-README"

  cat > "$pkgdir/usr/bin/eigrp" << EOF
#!/bin/sh
cd /usr/share/eigrp
exec perl eigrp.pl "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/eigrp"
}

